<template>
  <div class="header wrap">
    <h1><img src="../assets/img/indexLogo.6f8ac4f0.png" alt="" /></h1>

    <div id="nav" class="navbox">
      <router-link to="/home" :class="{ current: $route.path === '/home' }"
        >首页</router-link
      >
      <router-link to="/goods" :class="{ current: $route.path === '/goods' }"
        >全部商品</router-link
      >
      <router-link to="/user" :class="{ current: $route.path === '/user' }"
        >个人中心</router-link
      >
      <router-link to="/order" :class="{ current: $route.path === '/order' }"
        >我的订单</router-link
      >
      <router-link to="/free" :class="{ current: $route.path === '/free' }"
        >专属福利</router-link
      >
    </div>

    <div class="searchbox">
      <input type="text" placeholder="请输入关键字" />
      <span> <img src="../assets/img/search.png" alt="" /></span>
    </div>
  </div>
</template>

<script>
export default {};
</script>

<style lang="less" scoped>
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 118px;
  .navbox {
    width: 500px;
    display: flex;
    justify-content: space-between;
    a {
      text-decoration: none;
      color: #242b39;
    }
    .current {
      color: #0a328e;
      font-weight: bold;
    }
  }
  .searchbox {
    display: flex;
    input {
      width: 214px;
      height: 40px;
      border: 1px solid #dedede;
      border-radius: 20px 0px 0px 20px;
      padding-left: 20px;
      box-sizing: border-box;
    }
    span {
      width: 50px;
      height: 40px;
      line-height: 40px;
      background: #0a328e;
      border-radius: 0px 20px 20px 0px;
      text-align: center;
    }
  }
}
</style>